Skip to content

fix(buzz-acp): suppress agent console window on Windows (CREATE_NO_WINDOW)#2416

Open
philpof102-svg wants to merge 2 commits into
block:mainfrom
philpof102-svg:fix/buzz-acp-windows-no-window
Open

fix(buzz-acp): suppress agent console window on Windows (CREATE_NO_WINDOW)#2416
philpof102-svg wants to merge 2 commits into
block:mainfrom
philpof102-svg:fix/buzz-acp-windows-no-window

Conversation

@philpof102-svg

Copy link
Copy Markdown

Summary

On Windows, an external ACP agent runtime (e.g. the Claude Code adapter) pops a fresh, lingering console window for every agent subprocess. This makes buzz-acp on Windows visually broken when the agent isn't the bundled buzz-agent.

Root cause

The desktop already spawns the harness with CREATE_NO_WINDOWdesktop/src-tauri/src/managed_agents/runtime.rs sets it, with a comment noting "Without this a bare terminal pops for buzz-acp.exe and lingers". So buzz-acp runs with no console of its own.

But AcpClient::spawn (crates/buzz-acp/src/acp.rs) launches the agent subprocess without that flag (only #[cfg(unix)] process_group(0) is set). Because the parent has no console to share, Windows allocates a new visible console for each console-subsystem agent child — the claude-agent-acp / goose cmd shim, node, claude.exe. External adapters (Claude Code runtime) hit this; the GUI-subsystem bundled buzz-agent does not, which is why it only shows up with external runtimes.

Fix

Mirror the desktop's suppression at the harness spawn: set CREATE_NO_WINDOW on Windows in AcpClient::spawn, alongside the existing #[cfg(unix)] process_group(0). tokio::process::Command::creation_flags is inherent on Windows. stdio pipes are unaffected.

#[cfg(windows)]
{
    const CREATE_NO_WINDOW: u32 = 0x0800_0000;
    cmd.creation_flags(CREATE_NO_WINDOW);
}

Repro

Windows, Buzz 0.4.22, deploy an agent using the Claude Code runtime → a console window pops (per agent child) and lingers. With buzz-agent (GUI subsystem) it does not.

Testing

Change is a 6-line #[cfg(windows)] addition mirroring code already present in the desktop crate. Full disclosure: I could not run a local Windows build to exercise it end-to-end (my machine has no MSVC linker installed), so I'm relying on the review + CI here rather than claiming a local run. Happy to adjust placement/style.

@philpof102-svg
philpof102-svg requested a review from a team as a code owner July 22, 2026 19:58
…NDOW)

The desktop spawns buzz-acp with CREATE_NO_WINDOW (managed_agents/runtime.rs), so the
harness has no console to share. AcpClient::spawn launched the agent subprocess without
the flag, so every console-subsystem agent child on Windows — the `claude-agent-acp`/
`goose` cmd shim, node, `claude.exe` — got a fresh visible console window that lingered.
External adapters (Claude Code) hit this; the GUI-subsystem bundled `buzz-agent` did not.

Mirror the desktop's suppression at the harness spawn: set CREATE_NO_WINDOW on Windows,
alongside the existing #[cfg(unix)] process_group(0). stdio pipes are unaffected.

Signed-off-by: Philippe <philpof97@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@philpof102-svg

Copy link
Copy Markdown
Author

Added a second commit: the same CREATE_NO_WINDOW gap exists in buzz-agent's MCP spawn (crates/buzz-agent/src/mcp.rs spawn_one), so any node-based MCP server added to a buzz-agent pops a console window on Windows too. Extended the fix to cover both harnesses so the Windows console suppression is complete. Same one-line #[cfg(windows)] mirror of the desktop's flag.

…E_NO_WINDOW)

Same systemic gap as the buzz-acp fix, in the sibling harness: buzz-agent is spawned by the
desktop with CREATE_NO_WINDOW (managed_agents/runtime.rs), so it has no console to share. But
spawn_one() in mcp.rs launches each MCP server subprocess without that flag, so every
console-subsystem MCP server child on Windows — a `node` stdio server, a cmd shim — gets a fresh
visible console window that lingers. This hits any node-based MCP server added to a buzz-agent.

Mirror the desktop's suppression at the MCP spawn, alongside the existing #[cfg(unix)]
process_group(0). tokio::process::Command::creation_flags is inherent on Windows.

Signed-off-by: Philippe <philpof97@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant